import redis

# RedisUtils 操作工具类
class RedisUtils:
    def __init__(self, db=0, decode_responses=True):
        self.conn = redis.StrictRedis(
            host='localhost',
            port=6379,
            password='',
            db=db,
            decode_responses=decode_responses
        )
    def zIncrby(self, increment,member):
        self.conn.zincrby("Hot_search",increment,member )
    def zRevRangeWithScores(self):
        return self.conn.zrevrange("Hot_search", 0, 20, withscores=True)








